package game.games.carcassonne;

import game.cellmap.AbstractCellMap;
import game.coord.MapGenerator;

import java.awt.Point;

public class CarcassonneMap extends AbstractCellMap<AngledTile>
{
    public CarcassonneMap()
    {
        super(false, TileLoader.getTile(0).getTile().getBitmap().getWidth());
    }
    
    public Tile getTile(int x, int y)
    {
        return getCells().getValue(new Point(x, y)).getTile();
    }
    
    public int getAngle(int x, int y)
    {
        return getCells().getValue(new Point(x, y)).getAngle();
    }

    @Override
    public void sync()
    {
        setCells(MapGenerator.generateList(getMapSize(), new AngledTile()));
    }
}
